import com.google.appengine.api.datastore.Entity
import cn.xiazhengxin.blog.util.ThirdUtils as tu

def entity = new Entity("article")

entity << params

entity.pubTime = tu.getFormattedTime()

entity.save()

request['message'] = "文章添加成功!"

redirect "/"